package com.kavitha.learn.spring1;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

	@SuppressWarnings({ "resource"})
	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
		EmployeeDAO employeeDAO1 = context.getBean(EmployeeDAO.class);
		System.out.println(employeeDAO1.getAllEmployees());
		employeeDAO1=null;
		employeeDAO1 = context.getBean(EmployeeDAO.class);
		EmployeeDAO employeeDAO2 = (EmployeeDAO) context.getBean("employeeDAO");
		System.out.println(employeeDAO1==employeeDAO2);
		
		B b = context.getBean(B.class);
		
		System.out.println(b);
		
	}

}
